//
//  RBPlayerApi.h
//  Pods
//
//  Created by baxiang on 2017/5/10.
//
//

#import <Foundation/Foundation.h>
#import "RBResourceModel.h"

NS_ASSUME_NONNULL_BEGIN
@interface RBPlayerApi : NSObject

/**
 获取模块底下分类
 
 @param deviceId 设备ID
 @param modId 模块ID
 @param page 当前页码 起始值 1
 */
+ (void )fetchCategotyList:(NSString *_Nullable)deviceId modId:(NSString *_Nullable)modId  page:(NSInteger)page completionBlock:(nullable void (^)(RBCategotyList* _Nullable list,NSError * _Nullable error)) completionBlock;


/**
 获取当前分类底下的资源列表
 
 @param deviceId  设备ID
 @param catId 分类id
 @param catName 分类名称
 @param page 当前页码 起始值 1
 
 */
+ (void )fetchResourceList:(NSString *_Nullable)deviceId catId:(NSNumber *_Nullable)catId catName:(NSString *_Nullable)catName page:(NSInteger)page completionBlock:(nullable void (^)(RBResourceList* _Nullable list,NSError * _Nullable error)) completionBlock;


/**
 播放当前的资源
 
 @param deviceId 设备ID
 @param actid 0 :播放当前资源 1上一首 2 下一首
 @param catId 分类id
 @param sourceId 资源ID
 */
+ (void )playResource:(NSString *)deviceId actid:(NSInteger)actid catId:(NSNumber *)catId sourceId:(NSNumber *)sourceId completionBlock:(void (^)(id response, NSError * _Nullable))completionBlock;

/**
 停止播放资源
 
 @param deviceId 当前设备id
 */
+ (void )stopPlayResource:(NSString *)deviceId  completionBlock:(void (^)(BOOL response, NSError * _Nullable))completionBlock;

/**
 获取播放状态
 
 @param deviceId 当前设备id
 */
+ (void )fetchPlayStatus:(NSString *) deviceId completionBlock:(void (^)(RBPlayInfoModel* response, NSError * _Nullable))completionBlock;
@end
NS_ASSUME_NONNULL_END
